package org.example.infrastructure.persistent.dao;

import org.apache.ibatis.annotations.Mapper;
import org.example.domain.activity_manage.model.entity.PrizeEntity;
import org.example.infrastructure.persistent.po.PrizePO;

import java.util.List;

/**
 * @author lxc18
 * @date 2025/3/12 11:42
 * @description ILotteryRecord
 */
@Mapper
public interface IPrizeDao {
    boolean createPrize(PrizePO prizePO);
    boolean deletePrize(Long prizeId);
    boolean updatePrize(PrizePO prizePO);
    List<PrizePO> queryPrizeByName(String prizeName);
    PrizePO queryPrizeById(Long prizeId);
    List<PrizePO> queryPrizeByPage(int pageNum, int pageSize);
    //    修改指定奖品库存，定时任务中使用
    boolean updatePrizeStock(Long prizeId, int stock);

    void decrPrizeStock(Long prizeId,int size);

    void updateStockToZero(Long prizeId);

    List<PrizePO> queryPrizeByIds(List<Long> missedIds);
//什么时候用这个？
//    int getPrizeStock(Long prizeId);
}
